<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Icon 图标组件 | YL-UI</title>
    <meta name="generator" content="VuePress 1.8.2">
    
    <meta name="description" content="yl-ui 组件库文档">
    
    <link rel="preload" href="/yl-ui/assets/css/0.styles.4e038eaa.css" as="style"><link rel="preload" href="/yl-ui/assets/js/app.75a4d648.js" as="script"><link rel="preload" href="/yl-ui/assets/js/2.35f03a09.js" as="script"><link rel="preload" href="/yl-ui/assets/js/3.209edaa1.js" as="script"><link rel="prefetch" href="/yl-ui/assets/js/10.d0610750.js"><link rel="prefetch" href="/yl-ui/assets/js/11.271fd51f.js"><link rel="prefetch" href="/yl-ui/assets/js/12.d2c043c3.js"><link rel="prefetch" href="/yl-ui/assets/js/13.68a828bf.js"><link rel="prefetch" href="/yl-ui/assets/js/4.dd5f75e4.js"><link rel="prefetch" href="/yl-ui/assets/js/5.d3550bfa.js"><link rel="prefetch" href="/yl-ui/assets/js/6.51e13199.js"><link rel="prefetch" href="/yl-ui/assets/js/7.f0bcc823.js"><link rel="prefetch" href="/yl-ui/assets/js/8.f5ede323.js"><link rel="prefetch" href="/yl-ui/assets/js/9.278a947b.js">
    <link rel="stylesheet" href="/yl-ui/assets/css/0.styles.4e038eaa.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/yl-ui/" class="home-link router-link-active"><!----> <span class="site-name">YL-UI</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="https://github.com/Libra-Lei/yl-ui" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="https://github.com/Libra-Lei/yl-ui" target="_blank" rel="noopener noreferrer" class="nav-link external">
  GitHub
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>基础组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/yl-ui/components/base/icon.html" aria-current="page" class="active sidebar-link">Icon</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/yl-ui/components/base/icon.html#基础用法" class="sidebar-link">基础用法</a></li><li class="sidebar-sub-header"><a href="/yl-ui/components/base/icon.html#attribute" class="sidebar-link">Attribute</a></li></ul></li><li><a href="/yl-ui/components/base/radio.html" class="sidebar-link">Radio</a></li><li><a href="/yl-ui/components/base/upload.html" class="sidebar-link">Upload</a></li><li><a href="/yl-ui/components/base/tag.html" class="sidebar-link">Tag</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>高阶组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/yl-ui/components/high/upload-table.html" class="sidebar-link">UploadTable</a></li><li><a href="/yl-ui/components/high/checkbox-group.html" class="sidebar-link">CheckboxGroup</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="icon-图标组件"><a href="#icon-图标组件" class="header-anchor">#</a> Icon 图标组件</h1> <div class="custom-block tip"><p class="custom-block-title">提示</p> <blockquote><p>本组件使用的是自制图标字体库，有关所有可用图标，请访问 <a href="https://libra-lei.github.io/yl-icons/demo.html" target="_blank" rel="noopener noreferrer">YL-ICONS<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>。</p></blockquote></div> <h2 id="基础用法"><a href="#基础用法" class="header-anchor">#</a> 基础用法</h2> <div class="demo-block demo-zh-CN demo-icon.html" data-v-47d1da0a><div class="demo-content" data-v-47d1da0a><div><div><ul class="icon-list"><li><div><i class="yl-icons icon-check_order" style="font-size:32px;color:;"></i></div> <p>check_order</p></li><li><div><i class="yl-icons icon-running_order" style="font-size:32px;color:;"></i></div> <p>running_order</p></li><li><div><i class="yl-icons icon-sign_order" style="font-size:32px;color:;"></i></div> <p>sign_order</p></li><li><div><i class="yl-icons icon-start_order" style="font-size:32px;color:;"></i></div> <p>start_order</p></li><li><div><i class="yl-icons icon-summary_order" style="font-size:32px;color:;"></i></div> <p>summary_order</p></li><li><div><i class="yl-icons icon-verify_order" style="font-size:32px;color:;"></i></div> <p>verify_order</p></li><li><div><i class="yl-icons icon-complete_order" style="font-size:32px;color:;"></i></div> <p>complete_order</p></li><li><div><i class="yl-icons icon-finish_order" style="font-size:32px;color:;"></i></div> <p>finish_order</p></li><li><div><i class="yl-icons icon-control_system" style="font-size:32px;color:;"></i></div> <p>control_system</p></li><li><div><i class="yl-icons icon-power_management" style="font-size:32px;color:;"></i></div> <p>power_management</p></li><li><div><i class="yl-icons icon-power_station" style="font-size:32px;color:;"></i></div> <p>power_station</p></li><li><div><i class="yl-icons icon-pv_monitor" style="font-size:32px;color:;"></i></div> <p>pv_monitor</p></li><li><div><i class="yl-icons icon-pv" style="font-size:32px;color:;"></i></div> <p>pv</p></li><li><div><i class="yl-icons icon-turbine_monitor" style="font-size:32px;color:;"></i></div> <p>turbine_monitor</p></li><li><div><i class="yl-icons icon-weather_station" style="font-size:32px;color:;"></i></div> <p>weather_station</p></li><li><div><i class="yl-icons icon-wind_farm" style="font-size:32px;color:;"></i></div> <p>wind_farm</p></li></ul></div></div></div> <div class="meta" data-v-47d1da0a><div class="description" data-v-47d1da0a><div data-v-47d1da0a><p data-v-47d1da0a>示例</p></div></div> <div class="code-content" data-v-47d1da0a><div class="language-html extra-class" data-v-47d1da0a><pre class="language-html" data-v-47d1da0a><code data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>template</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
  <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>div</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
    <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>ul</span> <span class="token attr-name" data-v-47d1da0a>class</span><span class="token attr-value" data-v-47d1da0a><span class="token punctuation attr-equals" data-v-47d1da0a>=</span><span class="token punctuation" data-v-47d1da0a>&quot;</span>icon-list<span class="token punctuation" data-v-47d1da0a>&quot;</span></span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
      <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>li</span>
        <span class="token attr-name" data-v-47d1da0a>v-for</span><span class="token attr-value" data-v-47d1da0a><span class="token punctuation attr-equals" data-v-47d1da0a>=</span><span class="token punctuation" data-v-47d1da0a>&quot;</span>(icon, index) in icons<span class="token punctuation" data-v-47d1da0a>&quot;</span></span>
        <span class="token attr-name" data-v-47d1da0a>:key</span><span class="token attr-value" data-v-47d1da0a><span class="token punctuation attr-equals" data-v-47d1da0a>=</span><span class="token punctuation" data-v-47d1da0a>&quot;</span>index<span class="token punctuation" data-v-47d1da0a>&quot;</span></span>
      <span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
        <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>yl-icon</span>
          <span class="token attr-name" data-v-47d1da0a>size</span><span class="token attr-value" data-v-47d1da0a><span class="token punctuation attr-equals" data-v-47d1da0a>=</span><span class="token punctuation" data-v-47d1da0a>&quot;</span>32px<span class="token punctuation" data-v-47d1da0a>&quot;</span></span>
          <span class="token attr-name" data-v-47d1da0a>:icon</span><span class="token attr-value" data-v-47d1da0a><span class="token punctuation attr-equals" data-v-47d1da0a>=</span><span class="token punctuation" data-v-47d1da0a>&quot;</span>icon<span class="token punctuation" data-v-47d1da0a>&quot;</span></span>
        <span class="token punctuation" data-v-47d1da0a>/&gt;</span></span>
        <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>p</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>{{ icon }}<span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>p</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
      <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>li</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
    <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>ul</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
  <span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>div</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
<span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>template</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>

<span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>script</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span><span class="token script" data-v-47d1da0a><span class="token language-javascript" data-v-47d1da0a>
<span class="token keyword" data-v-47d1da0a>export</span> <span class="token keyword" data-v-47d1da0a>default</span> <span class="token punctuation" data-v-47d1da0a>{</span>
  <span class="token function" data-v-47d1da0a>data</span><span class="token punctuation" data-v-47d1da0a>(</span><span class="token punctuation" data-v-47d1da0a>)</span> <span class="token punctuation" data-v-47d1da0a>{</span>
    <span class="token keyword" data-v-47d1da0a>return</span> <span class="token punctuation" data-v-47d1da0a>{</span>
      icons<span class="token operator" data-v-47d1da0a>:</span> <span class="token punctuation" data-v-47d1da0a>[</span>
        <span class="token string" data-v-47d1da0a>'check_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'running_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'sign_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'start_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'summary_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'verify_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'complete_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'finish_order'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'control_system'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'power_management'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'power_station'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'pv_monitor'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'pv'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'turbine_monitor'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'weather_station'</span><span class="token punctuation" data-v-47d1da0a>,</span>
        <span class="token string" data-v-47d1da0a>'wind_farm'</span>
      <span class="token punctuation" data-v-47d1da0a>]</span>
    <span class="token punctuation" data-v-47d1da0a>}</span>
  <span class="token punctuation" data-v-47d1da0a>}</span>
<span class="token punctuation" data-v-47d1da0a>}</span>
</span></span><span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>script</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>


<span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;</span>style</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span><span class="token style" data-v-47d1da0a><span class="token language-css" data-v-47d1da0a>
<span class="token selector" data-v-47d1da0a>.icon-list</span> <span class="token punctuation" data-v-47d1da0a>{</span>
  <span class="token property" data-v-47d1da0a>display</span><span class="token punctuation" data-v-47d1da0a>:</span> flex<span class="token punctuation" data-v-47d1da0a>;</span>
  <span class="token property" data-v-47d1da0a>flex-flow</span><span class="token punctuation" data-v-47d1da0a>:</span> wrap<span class="token punctuation" data-v-47d1da0a>;</span>
<span class="token punctuation" data-v-47d1da0a>}</span>

<span class="token selector" data-v-47d1da0a>.icon-list li</span><span class="token punctuation" data-v-47d1da0a>{</span>
  <span class="token property" data-v-47d1da0a>display</span><span class="token punctuation" data-v-47d1da0a>:</span> flex<span class="token punctuation" data-v-47d1da0a>;</span>
  <span class="token property" data-v-47d1da0a>flex-direction</span><span class="token punctuation" data-v-47d1da0a>:</span> column<span class="token punctuation" data-v-47d1da0a>;</span>
  <span class="token property" data-v-47d1da0a>align-items</span><span class="token punctuation" data-v-47d1da0a>:</span> center<span class="token punctuation" data-v-47d1da0a>;</span>
  <span class="token property" data-v-47d1da0a>padding</span><span class="token punctuation" data-v-47d1da0a>:</span> 12px<span class="token punctuation" data-v-47d1da0a>;</span>
<span class="token punctuation" data-v-47d1da0a>}</span>

<span class="token selector" data-v-47d1da0a>.icon-list li p</span> <span class="token punctuation" data-v-47d1da0a>{</span>
  <span class="token property" data-v-47d1da0a>font-size</span><span class="token punctuation" data-v-47d1da0a>:</span> 14px<span class="token punctuation" data-v-47d1da0a>;</span>
  <span class="token property" data-v-47d1da0a>font-weight</span><span class="token punctuation" data-v-47d1da0a>:</span> 800<span class="token punctuation" data-v-47d1da0a>;</span>
  <span class="token property" data-v-47d1da0a>margin-top</span><span class="token punctuation" data-v-47d1da0a>:</span> 4px<span class="token punctuation" data-v-47d1da0a>;</span>
<span class="token punctuation" data-v-47d1da0a>}</span>
</span></span><span class="token tag" data-v-47d1da0a><span class="token tag" data-v-47d1da0a><span class="token punctuation" data-v-47d1da0a>&lt;/</span>style</span><span class="token punctuation" data-v-47d1da0a>&gt;</span></span>
</code></pre></div></div></div> <div class="demo-block-control" style="width:unset;" data-v-47d1da0a><i class="caret-bottom icon" data-v-47d1da0a data-v-47d1da0a></i> <span style="display:none;" data-v-47d1da0a data-v-47d1da0a>显示代码</span> <span class="copy-action" style="display:;" data-v-47d1da0a>复制代码</span> <span class="copy-action copy-action-success" style="display:none;" data-v-47d1da0a data-v-47d1da0a>复制代码</span></div></div><h2 id="attribute"><a href="#attribute" class="header-anchor">#</a> Attribute</h2> <table><thead><tr><th style="text-align:left;">参数</th> <th style="text-align:left;">类型</th> <th style="text-align:left;">说明</th> <th style="text-align:left;">可选值</th> <th style="text-align:left;">默认值</th></tr></thead> <tbody><tr><td style="text-align:left;">icon</td> <td style="text-align:left;">string</td> <td style="text-align:left;">图标</td> <td style="text-align:left;">例如：check_order</td> <td style="text-align:left;">--</td></tr> <tr><td style="text-align:left;">size</td> <td style="text-align:left;">string</td> <td style="text-align:left;">图标大小</td> <td style="text-align:left;">rgb(255, 222, 222) / red / #333333</td> <td style="text-align:left;">--</td></tr></tbody></table></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">最后更新时间:</span> <span class="time">2021-3-19 10:00:04</span></div></footer> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/yl-ui/components/base/radio.html">
        Radio
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/yl-ui/assets/js/app.75a4d648.js" defer></script><script src="/yl-ui/assets/js/2.35f03a09.js" defer></script><script src="/yl-ui/assets/js/3.209edaa1.js" defer></script>
  </body>
</html>
